"""EDA信号处理包

这是一个专业的EDA（皮肤电导）信号处理包，提供完整的信号预处理、
峰值检测、指标计算和质量评估功能。

主要功能：
- 多种预处理算法（基础、改进、NeuroKit2）
- 峰值检测算法（SCR事件检测）
- 综合指标计算（时域、频域、质量指标）
- 批量处理支持
- 可扩展的算法注册机制

使用示例：
    from eda_processor import EDAProcessor
    
    processor = EDAProcessor()
    result = processor.process(eda_data, sampling_rate=4)
    print(f"质量评分: {result['quality']['overall_score']}")
"""

from .core.pipeline import process_eda_pipeline, EDAProcessor
from .utils.batch_processor import process_eda_batch
from .core.registry import list_available_algorithms

# 注册所有算法
from .algorithms import preprocessors, peak_detectors, metrics_calculators, quality_assessors
from .core.registry import register_algorithm

# 注册预处理算法
register_algorithm('preprocessors', 'basic', preprocessors.preprocess_basic)
register_algorithm('preprocessors', 'improved', preprocessors.preprocess_improved)
register_algorithm('preprocessors', 'neurokit2', preprocessors.preprocess_neurokit2)

# 注册峰值检测算法
register_algorithm('peak_detectors', 'basic', peak_detectors.detect_peaks_basic)
register_algorithm('peak_detectors', 'improved', peak_detectors.detect_peaks_improved)
register_algorithm('peak_detectors', 'neurokit2', peak_detectors.detect_peaks_neurokit2)

# 注册指标计算算法
register_algorithm('metrics_calculators', 'basic', metrics_calculators.calculate_metrics_basic)
register_algorithm('metrics_calculators', 'comprehensive', metrics_calculators.calculate_metrics_comprehensive)
register_algorithm('metrics_calculators', 'neurokit2', metrics_calculators.calculate_metrics_neurokit2)

# 注册质量评估算法
register_algorithm('quality_assessors', 'basic', quality_assessors.assess_quality_basic)
register_algorithm('quality_assessors', 'improved', quality_assessors.assess_quality_improved)

__version__ = "1.0.0"
__author__ = "SphixLong"
__email__ = "support@sphinxlong.com"

__all__ = [
    'process_eda_pipeline', 
    'process_eda_batch', 
    'list_available_algorithms'
]